<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
</head>

<body>

	<script>
		const _getExFilename = (filename) => {
			// 补全代码
			let arr = filename.split('.').at(-1)
			console.log('arr', '.' + arr)
			return '.' + arr

		}
		_getExFilename('asdf.text')
	</script>
</body>

</html>